package com.zyj.springboothapim.service.impl;

import com.zyj.springboothapim.bean.User;
import com.zyj.springboothapim.mapper.RoomMapper;
import com.zyj.springboothapim.mapper.UserMapper;
import com.zyj.springboothapim.service.UserService;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService
{
    private UserMapper userMapper;
    @Autowired
    public void setUserMapper(UserMapper userMapper){this.userMapper = userMapper;}

//    @Select("select * from user_table")
    @Override
    public List<User> selectUser()
    {
        return userMapper.selectUser();
    }

    //添加租户
    @Override
    public void insertUser(User user)
    {
        userMapper.insertUser(user);
    }

    @Override
    public void updateUser(User user)
    {
        userMapper.updateUser(user);
    }
}
